package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.LoanNewCreditCardOrderService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanNewCreditCardOrderRequest;
import com.tuanzi.loan.vo.response.family.LoanNewCreditCardOrderResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-09-13 14:12
 */
public class LoanNewCreditCardOrderLazyDataModel extends BaseLazyDataModel<LoanNewCreditCardOrderRequest,LoanNewCreditCardOrderResponse> {
    private LoanNewCreditCardOrderService loanNewCreditCardOrderService = SpringContextHolder.getBean(LoanNewCreditCardOrderService.class);
    public LoanNewCreditCardOrderLazyDataModel(LoanNewCreditCardOrderRequest loanNewCreditCardOrderRequest) {
        super(loanNewCreditCardOrderRequest);
    }

    @Override
    protected Page<LoanNewCreditCardOrderResponse> doLoad(PageSearcher<LoanNewCreditCardOrderRequest> pageSearcher) {
        return loanNewCreditCardOrderService.list(pageSearcher);
    }
}
